<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en" >
<%@include file="../../common/taglib/taglib.jsp" %>
<%@include file="../common/dwz.jsp" %>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="${baseURL}/dwz/images/loginuser.png" type="image/png">
    <title>风陵渡黄河大桥健康检测及运营安全智能预警系统登录界面</title>

    <link href="${baseURL}/dwz/css/style.default.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/bootstrap-override.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/jquery-ui-1.10.3.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/weather-icons.min.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/animate.delay.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/animate.min.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/toggles.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/select2.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/lato.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/roboto.css" rel="stylesheet">
</head>

<body class="signin">


<section>

    <div class="signinpanel">

        <div class="row">

            <div class="col-md-7">

                <div class="signin-info">
                    <div class="logopanel">
                        <h1><span>[</span> 风陵渡黄河大桥 <span>]</span></h1>
                    </div><!-- logopanel -->

                    <div class="mb20"></div>

                    <h5><strong>健康检测及运营安全智能预警系统登录界面</strong></h5>
                    <ul>
                        <li><i class="fa fa-arrow-circle-o-right mr5"></i> 数据处理子系统</li>
                        <li><i class="fa fa-arrow-circle-o-right mr5"></i> 数据存储、查询、共享子系统</li>
                        <li><i class="fa fa-arrow-circle-o-right mr5"></i> 结构受力检测预警系统</li>
                        <li><i class="fa fa-arrow-circle-o-right mr5"></i> 超限管理站重载数据推送</li>
                        <li><i class="fa fa-arrow-circle-o-right mr5"></i> 安全评估统计分析.</li>
                        <li><i class="fa fa-arrow-circle-o-right mr5"></i> 系统管理</li>
                    </ul>
                </div><!-- signin0-info -->

            </div><!-- col-sm-7 -->

            <div class="col-md-5">

                <form method="post" action="index.html">
                    <h4 class="nomargin">登录</h4>
                    <p class="mt5 mb20">登录进入您的帐户。</p>

                    <input type="text" class="form-control uname" id="username" placeholder="账号" />
                    <input type="password" class="form-control pword" id="password" placeholder="密码" />
                    <a href=""><small>忘记密码?</small></a>
                    <button class="btn btn-success btn-block" id="login_btn">登录</button>

                </form>
            </div><!-- col-sm-5 -->

        </div><!-- row -->

        <div class="signup-footer">
            <div class="pull-left">
                &copy; 2019.保留所有权利。
            </div>
            <div class="pull-right">
                由: <a href="http://themepixels.com/" target="_blank">一股劲</a>
            </div>
        </div>

    </div><!-- signin -->

</section>
</body>
<script type="text/javascript">
    $("#login_btn").click(function(){
        var loginName = $.trim($("#username").val());
        var password = $.trim($("#password").val());
        if(loginName == ""){
            alert("请输入用户名");
            return false;
        }else if(password == ""){
            alert("请输入密码");
            return false;
        }
        var data = {loginName:loginName,password:password}
        $.ajax({
            url: "${baseURL}/do_login",
            type: "POST",
            data:data,
            success:function(message) {
                console.log(message)
                if (message.code == 0) {
                    alert("登录成功")
                    window.location.href = "${baseURL}/index/home"
                }
            },
            error:function(message){
                alert("登录失败")
            }
        });
    });

</script>
</html>
